class Top
{
    int x;
public:
    Top(int i) : x(i) {}
};

class Left : public virtual Top
{
public:
    Left(int i) : Top(i) {}
};

class Right : public virtual Top
{
public:
    Right(int i) : Top(i) {}
};

class Bottom : public Left, public Right
{
public:
    Bottom(int i) : Top(i), Left(i), Right(i){}
};

int main()
{
   Bottom b(2);
}

